package www.sofn.com.goods.domain.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.util.List;

@Data
@Accessors(chain = true)
@Schema(description = "商品展示详情")
public class GoodsDisplayInfoVO {
    @Schema(description = "商品Id")
    private String id;
    @Schema(description = "商品名称")
    private String goodsName; //商品名称
    @Schema(description = "商品轮播")
    private String goodsCarousel; //商品轮播
    @Schema(description = "商品属性")
    private GoodsAttr goodsAttr; //商品属性
    @Schema(description = "商品详情图片")
    private String goodsInfoImg;
    @Schema(description = "商品规格参数")
    private List<GoodsSpecs> goodsSpecs;
    @Data
    @Accessors(chain = true)
    @Schema(description = "商品规格")
    public static class GoodsSpecs {  //商品规格
        @Schema(description = "k")
        private String k;
        @Schema(description = "v")
        private String v;
        private String b;
    }

    @Data
    @Accessors(chain = true)
    @ToString
    @Schema(description = "属性信息")
    public static class GoodsAttr {//商品sku属性
        @Schema(description = "属性名称")
        private String attrName; //属性名称
        @Schema(description = "属性值")
        private  List<AttrInfo> attrValue;
    }
    @Data
    @Accessors(chain = true)
    @ToString
    @Schema(description = "属性信息")
    public static class AttrInfo {
        @Schema(description = "属id")
        private String id;
        @Schema(description = "属性值")
        private String value; // 属性值
        @Schema(description = "属性图片")
        private String img; //属性图片
        @Schema(description = "会员价格")
        private BigDecimal memberPrice;//会员价格
        @Schema(description = "市场价格")
        private BigDecimal marketPrice;//市场价格
        @Schema(description = "库存")
        private Integer inventory;  //库存
    }


}
